#ifndef _SPI_DEV_H_
#define _SPI_DEV_H_

#include "my_gpio.h"

#define LCD_PIN_MISO -1
#define LCD_PIN_MOSI 5
#define LCD_PIN_CLK 3
#define LCD_PIN_CS 4

#define LCD_PIN_RST 34
#define LCD_PIN_RS 6
#define LCD_PIN_PWM 21

#define PIN_BK_LIGHT    2


void spi_bus_init(void);

void spi_wr_cmd(uint8_t cmd);
void spi_wr_byte(uint8_t data);

void DispColor_set(uint8_t x,uint8_t y,uint16_t width,uint16_t height, uint16_t color);

void lcd_point_refresh(uint16_t x1,uint16_t y1,uint16_t x2 ,uint16_t y2, unsigned char *p);

int SPI_transmitBlockData(const uint8_t *data, uint16_t length);

void lcd_show_character(uint8_t  x,uint8_t y,const uint8_t *font,uint16_t fore_color,uint16_t back_color);
void lcd_show_char16(uint16_t  x,uint16_t y,uint8_t font,uint16_t fore_color,uint16_t back_color);
void lcd_show_string16(uint16_t  x,uint16_t y,uint8_t *font,uint8_t font_num,uint16_t fore_color,uint16_t back_color);
void lcd_clear(void);
void lcd_show_num16_one(uint8_t x,uint16_t y,uint16_t num,uint16_t fore_color,uint16_t back_color);
void lcd_show_num16_2(uint8_t x,uint16_t y,uint16_t num,uint16_t fore_color,uint16_t back_color);
void lcd_show_num_uint(uint8_t x,uint16_t y,uint32_t num,uint16_t fore_color,uint16_t back_color);
#endif

